package dao

import "gorm.io/gorm"

type SwiperCategory struct{}

func (s *SwiperCategory) GetCategoryList(CategoryType int, db *gorm.DB) func(db *gorm.DB) *gorm.DB {
	return func(db *gorm.DB) *gorm.DB {
		if CategoryType == 0 {
			return db
		} else {
			return db.Where("type = ?", CategoryType)
		}
	}
}

var SwiperCategoryDao = new(SwiperCategory)
